package com.lq.ecoldchain.ui.mymileage

import android.graphics.Color
import android.os.Build
import android.support.v4.app.FragmentManager
import com.alibaba.android.arouter.facade.annotation.Route
import com.lq.ecoldchain.R
import com.lq.ecoldchain.base.BaseNavigator
import com.lq.ecoldchain.base.view.BaseActivity
import com.lq.ecoldchain.databinding.ActivityMileageBinding
import kotlinx.android.synthetic.main.activity_mileage.*
import org.kodein.di.Kodein
import org.kodein.di.generic.bind
import org.kodein.di.generic.instance

/*
*2019/1/5 0005  19:00
*function by lq
*/
@Route(path = BaseNavigator.mileage)
class MileageActivity : BaseActivity<ActivityMileageBinding>() {
    override val layoutId = R.layout.activity_mileage
    override val viewDelegate: MileageDelegate by instance()

    override fun initView() {
        titleGone()
        nonFitSystem()
        if (Build.VERSION.SDK_INT >= 21) window.statusBarColor = Color.TRANSPARENT
        binding.delegate = viewDelegate
        mileageTabLayout.setupWithViewPager(mileageViewPager)
    }

    override val kodein = Kodein.lazy {
        extend(parentKodein)
        import(mileageKodeinModule)
        bind<FragmentManager>() with instance(supportFragmentManager)
    }

}